<#if 'START'==data.status>
<!-- 合同挂账金额 -->
<#if roles.thisXiangmuManager>

<!-- 没有挂账金额的时候需要新建 -->
<#if !data.gzMoney??>
<!-- 当前用户可操作 -->
<span class="table-edit-btn table-edit-btn-primary new ${(data.type.collection?string('payout',''))}" title="新增" data-contract-id="${data.id}" data-type="C_GZ" data-source="${data.qyf}">
	<small>新建</small>
</span>

<!-- 收款合同需要回收挂账金额 -->
<#elseif data.type.collection && !data.gzMoney.gaveBack>
<!-- 当前用户可操作 -->
<span class="table-edit-btn table-edit-btn-danger change payin" title="收回" data-money-id="${data.gzMoney.id}" data-contract-id="${data.id}" style="padding-right: 0;">
	<small>收</small>
</span>
&nbsp;
<span class="table-edit-btn table-edit-btn-danger delete payin" title="删除" data-money-id="${data.gzMoney.id}" data-contract-id="${data.id}">
	<small>删</small>
</span>

<!-- 付款合同需要归还挂账金额 -->
<#elseif !data.type.collection && !data.gzMoney.gaveBack>
<!-- 当前用户可操作 -->
<span class="table-edit-btn table-edit-btn-danger change payout" title="退回" data-money-id="${data.gzMoney.id}" data-contract-id="${data.id}" style="padding-right: 0;">
	<small>退</small>
</span>
&nbsp;
<span class="table-edit-btn table-edit-btn-danger delete payout" title="删" data-money-id="${data.gzMoney.id}" data-contract-id="${data.id}">
	<small>删</small>
</span>

<!-- 标记为已收回 -->
<#else>
<small class="text-danger">&lt;${data.type.collection?string('已收回','已退回')}&gt;</small>

</#if>

<!--  -->
</#if>
</#if>
